package com.weeke.socialgraph;

import java.util.ArrayList;
import java.util.List;

import weibo4j.User;
import weibo4j.Weibo;

public class Friends {

	public List<User> getFriends(String accessToken, String accessTokenSecret) {
		System.setProperty("weibo4j.oauth.consumerKey", Weibo.CONSUMER_KEY);
    	System.setProperty("weibo4j.oauth.consumerSecret", Weibo.CONSUMER_SECRET);
		Weibo weibo = new Weibo();
		weibo.setToken(accessToken, accessTokenSecret);
		List<User> list = new ArrayList<User>();
		try {
			list = weibo.getFriendsStatuses();
			// System.out.println("Successfully get Friends to [" + list +
			// "].");
		} catch (Exception e1) {
			// TODO Auto-generated catch block
			e1.printStackTrace();
		}
		return list;
	}
}
